﻿using System;
using System.Collections;
using System.IO;
using System.Collections.ObjectModel;
using System.Linq;
using System.Xml.Linq;
using System.Text;
using System.Collections.Generic;
using MarketDashboardModule.Models;

namespace MarketDashboardModule
{
    public static class Global
    {

        private static List<Stock> _stocks = new List<Stock>();
        public static List<Stock> Stocks 
        {
            get { return _stocks; }
            set { _stocks = value; } 
        }
    }


    public static class MyExtensions
    {
        public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> collection)
        {
            ObservableCollection<T> list = new ObservableCollection<T>();

            foreach (T item in collection)
            {
                list.Add(item);
            }

            return list;
        }
    }
}